package com.lingxu.base.system.fileManage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingxu.base.system.fileManage.entity.SysFileInfo;
import com.lingxu.base.system.fileManage.mapper.SysFileInfoMapper;
import com.lingxu.base.system.fileManage.service.SysFileInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class SysFileInfoServiceImpl extends ServiceImpl<SysFileInfoMapper, SysFileInfo> implements SysFileInfoService {


    @Resource
    private SysFileInfoMapper sysFileInfoMapper;
    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @Override
    public List<SysFileInfo> findFileInfoByRecord(String id,String types) {
        try {
            Map<String,Object> map = new HashMap<>();
            map.put("RECORD_ID",id);
//            map.put("TABLE_NAME",types);
            return sysFileInfoMapper.selectByMap(map);
        }catch (Exception e){
            log.error("数据查询异常",e);
            return null;
        }
    }
}
